package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ArchMessageMapper;
import com.ruoyi.system.domain.ArchMessage;
import com.ruoyi.system.service.IArchMessageService;
import com.ruoyi.common.support.Convert;

/**
 * 消息传递 服务层实现
 * 
 * @author ruoyi
 * @date 2019-09-25
 */
@Service
public class ArchMessageServiceImpl implements IArchMessageService 
{
	@Autowired
	private ArchMessageMapper archMessageMapper;

	/**
     * 查询消息传递信息
     * 
     * @param id 消息传递ID
     * @return 消息传递信息
     */
    @Override
	public ArchMessage selectArchMessageById(Integer id)
	{
	    return archMessageMapper.selectArchMessageById(id);
	}
	
	/**
     * 查询消息传递列表
     * 
     * @param archMessage 消息传递信息
     * @return 消息传递集合
     */
	@Override
	public List<ArchMessage> selectArchMessageList(ArchMessage archMessage)
	{
	    return archMessageMapper.selectArchMessageList(archMessage);
	}
	
    /**
     * 新增消息传递
     * 
     * @param archMessage 消息传递信息
     * @return 结果
     */
	@Override
	public int insertArchMessage(ArchMessage archMessage)
	{
	    return archMessageMapper.insertArchMessage(archMessage);
	}
	
	/**
     * 修改消息传递
     * 
     * @param archMessage 消息传递信息
     * @return 结果
     */
	@Override
	public int updateArchMessage(ArchMessage archMessage)
	{
	    return archMessageMapper.updateArchMessage(archMessage);
	}

	/**
     * 删除消息传递对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteArchMessageByIds(String ids)
	{
		return archMessageMapper.deleteArchMessageByIds(Convert.toStrArray(ids));
	}

	@Override
	public void save(ArchMessage archMessage) {
		archMessageMapper.insertArchMessage(archMessage);
	}
	
}
